package com.haizhi.crm.biz.task.message.handler;

import com.haizhi.crm.biz.constant.MessageCategoryType;
import com.haizhi.crm.biz.task.message.model.ContextDto;
import org.springframework.stereotype.Component;

/**
 * Created by wangshan on 2018/5/29.
 */
@Component
public class SubTypeHandler extends AbstractHandler<ContextDto> {

    @Override
    protected MsgResponse process(ContextDto data) {
        String type = data.getEventType();
        if (MessageCategoryType.subType.containsKey(type)) {
            data.setEventType(MessageCategoryType.subType.get(type));
        }
        return MsgResponse.success();
    }

}
